Suicide data. (2020). from https://www.who.int/teams/mental-health-and-substance-use/suicide-data
World Health Organization. (2018). Suicide prevention,from http://www.who.int/mental_health/suicide-prevention/en/
“Gender Differences In Suicide”. 2020. En.Wikipedia.Org. https://en.wikipedia.org/wiki/Gender_differences_in_suicide#:~:text=Globally%2C%20death%20by%20suicide%20occurred,over%20the%20age%20of%2065.
library(readr)
library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(ggplot2)
library(plotly)
Attaching package: 'plotly'
The following object is masked from 'package:ggplot2':
last_plot
The following object is masked from 'package:stats':
filter
The following object is masked from 'package:graphics':
layout
suicideData <- read_csv("/Users/glameveline/RProjects/Fianl project/suicideData.csv")
Parsed with column specification:
cols(
country = col_character(),
year = col_double(),
sex = col_character(),
age = col_character(),
suicides_no = col_double(),
population = col_double()
)
head(suicideData)
summary(suicideData)
country year sex age
Length:3492 Min. :1995 Length:3492 Length:3492
Class :character 1st Qu.:1995 Class :character Class :character
Mode :character Median :2005 Mode :character Mode :character
Mean :2004
3rd Qu.:2015
Max. :2015
suicides_no population
Min. : 0.0 Min. : 279
1st Qu.: 1.0 1st Qu.: 71165
Median : 14.0 Median : 387728
Mean : 205.4 Mean : 1775099
3rd Qu.: 95.0 3rd Qu.: 1371678
Max. :21706.0 Max. :43509335
NA's :120 NA's :396
Found missing values in suicides_no and population
table(is.na(suicideData$suicides_no))
FALSE TRUE
3372 120
table(is.na(suicideData$population))
FALSE TRUE
3096 396
suicide_year <- suicideData %>%
filter(!is.na(population) & !is.na(suicides_no)) %>%
select(year,suicides_no,population) %>%
group_by(year) %>%
summarise(suicide_ratio=round((sum(suicides_no)/sum(population))*100000,2))
`summarise()` ungrouping output (override with `.groups` argument)
suicide_year
ggplot(data=suicide_year,aes(x=year,y=suicide_ratio))+geom_line()+
geom_point(colour = "red") +
geom_text(aes(label = suicide_ratio, vjust =-2, hjust =0.5))+
ylim(0,20)+
labs(
title = "World suicide rate trend over 20 years",
subtitle = "1995,2005 and 2005",
y = "Suicide Rate per 100K")
suicide_age <- suicideData %>%
filter(!is.na(population) & !is.na(suicides_no)) %>%
select(year,age,suicides_no,population) %>%
group_by(age,year) %>%
summarise(suicide_ratio=round((sum(suicides_no)/sum(population))*100000,2))
`summarise()` regrouping output by 'age' (override with `.groups` argument)
suicide_age
ggplot(data=suicide_age,aes(x=year,y=suicide_ratio, group=age,color=age))+
geom_line()+
geom_point()+
geom_text(aes(label = suicide_ratio, vjust =-2, hjust =0.5))+
ggtitle("World suicide rate by age group in the previous 20 years")+
labs(
y="Suicide Rate per 100K"
)
# top 10 per 100 k by region(country) in 2015
top10_suicide_country <- suicideData %>%
filter(!is.na(population) & !is.na(suicides_no) & year=='2015') %>%
select(country,suicides_no,population) %>%
group_by(country) %>%
summarise(suicide_ratio=round((sum(suicides_no)/sum(population))*100000,2)) %>%
arrange(desc(suicide_ratio)) %>%
head(10)
`summarise()` ungrouping output (override with `.groups` argument)
top10_suicide_country
plot_ly(data = top10_suicide_country,x=~reorder(country,-suicide_ratio),y=~suicide_ratio,type ='bar',color=top10_suicide_country$country,colors=c('Paired')) %>%
layout(title='World Top10 suicide commited regions in 2015',
yaxis=list(title='Suicide rate per 100K'),xaxis=list(title='Country'))
Warning: `arrange_()` is deprecated as of dplyr 0.7.0.
Please use `arrange()` instead.
See vignette('programming') for more help
This warning is displayed once every 8 hours.
Call `lifecycle::last_warnings()` to see where this warning was generated.
# Choropleth map of suicide rate in the year of 2015
suicide_country <- suicideData %>%
filter(!is.na(population) & !is.na(suicides_no) & year=='2015') %>%
select(country,suicides_no,population) %>%
group_by(country) %>%
summarise(suicide_ratio=round((sum(suicides_no)/sum(population))*100000,2))
`summarise()` ungrouping output (override with `.groups` argument)
suicide_country <- rename(suicide_country,region=country)
# importing world map
world_map <- map_data('world')
str(world_map)
'data.frame': 99338 obs. of 6 variables:
$ long : num -69.9 -69.9 -69.9 -70 -70.1 ...
$ lat : num 12.5 12.4 12.4 12.5 12.5 ...
$ group : num 1 1 1 1 1 1 1 1 1 1 ...
$ order : int 1 2 3 4 5 6 7 8 9 10 ...
$ region : chr "Aruba" "Aruba" "Aruba" "Aruba" ...
$ subregion: chr NA NA NA NA ...
# changing names of certain countries
world_map$region <- ifelse(world_map$region=='USA',"United States of America",world_map$region)
head(world_map,n=20)
# suicide map
world_suicide <- left_join(world_map,suicide_country,by='region')
head(world_suicide)
# vidualization
arrange(world_suicide, order) %>%
ggplot(aes(long, lat, group = group, fill =suicide_ratio)) +
geom_polygon() +
xlim(-110,150)+ylim(-20,90)+
coord_map("polyconic") +
theme(panel.grid =element_blank())+
scale_fill_continuous(low = "green", high = "red")+
labs(
y='',
x=''
)
suicide_gender <- suicideData %>%
filter(!is.na(population) & !is.na(suicides_no)) %>%
select(sex,year,suicides_no,population) %>%
group_by(sex,year) %>%
summarise(suicide_ratio=round((sum(suicides_no)/sum(population))*100000,2))
`summarise()` regrouping output by 'sex' (override with `.groups` argument)
suicide_gender
# vidualization
plot_ly(data = suicide_gender,x=~year,y=~suicide_ratio,type ='bar',color=suicide_gender$sex,colors=c('Paired')) %>%
layout(title='World suicide rate per 100K by gender',
yaxis=list(title='Suicide rate per 100K'))
Downward trend from 1995 to 2015
Age group of people over 75 years old is the group which committed suicide the most over 20 years.
Top 10 regions with the highest suicide rate in 2015: Lithuania, South Korea, Slovenia, Latvia, Hungary, Uruguay, Japan, Ukraine, Russia, Croatia.
More male die from suicide than women.
*This is also known as the gender paradox in suicide.
Suicide attempts are between two and four times more frequent among females.
Researchers have partly attributed the difference between attempted and completed suicides among the sexes to males using more lethal means to end their lives.
September 10 has been observed as ‘World Suicide Prevention Day’ in partnership with the International Association for Suicide Prevention and the World Health Organization.
South Korea Suicide Hotlines http://www.suicide.org/hotlines/international/south-korea-suicide-hotlines.html
Talk therapy
Suicide Survivors are Heroes